<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>查看物流</title>
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
        <meta content="yes" name="apple-mobile-web-app-capable"/>
        <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
        <meta content="telephone=no" name="format-detection"/>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="themes/js/clipboard.min.js"></script>
        <script src="themes/js/jquery.min.js"></script>
        <script src="themes/js/vue.js"></script>
        <link href="themes/css/style555.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <!--

         * 17素材vip建站专区模块代码
         * 详尽信息请看官网：http://www.17sucai.com/pins/vip
         *
         * Copyright , 温州易站网络科技有限公司版权所有
         *
         * 请尊重原创，未经允许请勿转载。
         * 在保留版权的前提下可应用于个人或商业用途

        -->
        <div id="el">
        <section class="aui-flexView">
            <header class="aui-navBar aui-navBar-fixed b-line">
                <a href="javascript:;" class="aui-navBar-item">
                    <i class="icon icon-return"></i>
                </a>
                <div class="aui-center">
                    <span class="aui-center-title">查看物流</span>
                </div>
                <a href="javascript:;" class="aui-navBar-item">
                    <i class="icon icon-more"></i>
                </a>
            </header>
            <section class="aui-scrollView">
                <div class="aui-flex aui-flex-lag">
                    <div class="aui-aircraft-img">
                        <img src="themes/img/icon-fj.png" alt="">
                    </div>
                    <div class="aui-flex-box">
                        <h2>
                            物流公司：<em v-text="realType"></em>
                        </h2>
                        <h2>
                            物流单号：<em id="em" v-text="numb"></em>
                        </h2>
                    </div>
                  <!--  <div class="aui-text-copy bttn" data-clipboard-text=""`>
                    	<a href="javascript:;">复制</a>
                    </div>-->
                </div>
                <div class="divHeight"></div>
                <div class="aui-flex aui-flex-lag">
                    <div class="aui-flex-box">
                        <h2 style="color:#333">订单跟踪</h2>
                    </div>
                </div>
                <div class="aui-timeLine b-line">
                    <ul class="aui-timeLine-content" v-html="wuliu">
                    </ul>
                </div>
                <div class="b-line divHeight"></div>
            </section>
        </section>
        </div>

        <script>
        	  var clipboard = new ClipboardJS('.bttn');
        clipboard.on('success', function(e) {
            console.log(e);
                });
            clipboard.on('error', function(e) {
                 console.log(e);
             });
              var myorderId=window.location.search.substr(1).split("=")[1].split("#")[0]
            var vue=new Vue({
                    el:"#el",
                    data:{
                        numb:"",
                        type:"",
                        wuliu:"",
                    },
                    created:function(){
                        this.queryMyOrderByOrderId();
                    },
                    methods:{
                        queryMyOrderByOrderId:function(){
                            var _this=this
                         var myorderId=window.location.search.substr(1).split("=")[1].split("#")[0];
                         $.ajax({
                             url:"/weixin/queryMyOrderByOrderId",
                             data:{myorderId:myorderId},
                             dataType:"json",
                             type:"get",
                             success:function(data){
                                 var a =JSON.parse(data.obj);
                                 if(a.status=="0"){
                                    var res=a.result;
                                    _this.numb=res.number;
                                    _this.type=res.type;
                                    var str="";
                                    for(var i=0;i<res.list.length;i++){
                                    str=str+`
                                    <li class="aui-timeLine-content-item">
                                <em class="aui-timeLine-content-icon"></em>
                                 <p>${res.list[i].status}</p>
                                <p style="margin-top: 10px;">${res.list[i].time}</p>
                                    </li>`}
                                  _this.wuliu=str;
                                }
                             }
                         })
                        }
                    },
                computed:{
                        realType:function(){
                            if(this.type.toUpperCase()=="SFEXPRESS"){
                                return "顺丰快递"
                            }else if(this.type.toUpperCase()=="STO"){
                                return "申通快递"
                            }else if(this.type.toUpperCase()=="YTO"){
                                return "圆通快递"
                            }else if(this.type.toUpperCase()=="ZTO"){
                                return "中通快递"
                            }else if(this.type.toUpperCase()=="YUNDA"){
                                return "韵达快递"
                            }else if(this.type.toUpperCase()=="HTKY"){
                                return "百世快递"
                            }else if(this.type.toUpperCase()=="EMS"){
                                return "EMS"
                            }
                        }
                }
            })
             </script>

    </body>
</html>
